// SciTE - Scintilla based Text Editor
/** @file DirectorExtension.h
 ** Extension for communicating with a director program.
 **/
// Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.

class DirectorExtension : public Extension {
private:
	DirectorExtension() {} // Singleton
	DirectorExtension(const DirectorExtension &); // Disable copy ctor
	void operator=(const DirectorExtension &);    // Disable operator=

public:
	static DirectorExtension &Instance();

	// Implement the Extension interface
	virtual bool Initialise(ExtensionAPI *host_);
	virtual bool Finalise();
	virtual bool Clear();
	virtual bool Load(const WCHAR *filename);

	virtual bool OnOpen(const WCHAR *path);
	virtual bool OnSwitchFile(const WCHAR *path);
	virtual bool OnSave(const WCHAR *path);
	virtual bool OnChar(WCHAR ch);
	virtual bool OnExecute(const WCHAR *s);
	virtual bool OnSavePointReached();
	virtual bool OnSavePointLeft();
	virtual bool OnStyle(unsigned int startPos, int lengthDoc, int initStyle, Accessor *styler);
	virtual bool OnDoubleClick();
	virtual bool OnUpdateUI();
	virtual bool OnMarginClick();
	virtual bool OnMacro(const WCHAR *command, const WCHAR *params);

	virtual bool SendProperty(const WCHAR *prop);
	virtual bool OnClose(const WCHAR *path);

	// Allow messages through to extension
	void HandleStringMessage(const WCHAR *message);
};

